1. Field of the Invention
The present invention relates to an image processing apparatus for calculating a global motion vector of a plurality of image frames constituting moving image information.
2. Description of the Related Art
There is conventionally known an imaging device, e.g., a digital camera, that corrects a camera shake caused by picking up a moving image by image processing, i.e., makes a so-called camera shake correction. A global motion vector of image frames necessary for the camera shake correction is calculated using a plurality of motion vectors calculated for fractionized small blocks, respectively. If a moving object is present in a screen, motion vectors related to moving object components different from those related to the camera shake are often locally present. When such motion vectors are present, the global motion vector cannot be calculated appropriately. Thus, as disclosed in Japanese Laid-Open Publication No. 2004-15376, there is proposed the following method of calculating a global motion vector. The method includes selecting only motion vectors in a range defined by an average value of motion vectors related to respective areas and a standard deviation thereof, obtaining contrast coefficients for the respective areas, obtaining weight coefficients based on the contrast coefficients, and then obtaining an average weight, thereby setting the obtained average weight as the global motion vector.
The conventional method described above has the following problems. If a moving object somewhat large in size is present in the screen, the large moving object influences the average value and the standard deviation based on which the determination is made, and the global motion vector cannot be appropriately calculated.
It is an object of the present invention to appropriately calculate a global motion vector of a plurality of image frames constituting moving image information.